import 'package:flutter/material.dart';
import 'package:flutter_eve_plugin/constants/font_family.dart';
import 'package:flutter_eve_plugin/constants/font_weight.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/checkpoint/stageinfo.dart';
import 'package:flutter_eve_plugin/utils/image_util.dart';
import 'package:flutter_eve_plugin/utils/screen_util.dart';

class CheckpointTitlePhysicalStrengthWidget extends StatelessWidget {
  final CheckpointStageInfo info;
  const CheckpointTitlePhysicalStrengthWidget({Key key, this.info})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(left: setRatio(26), top: setRatio(20)),
      child: Container(
        width: setRatio(110),
        height: setRatio(24),
        decoration: BoxDecoration(
            color: Color(0x6F000000),
            borderRadius: BorderRadius.circular(setRatio(5))),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            Text(
              '消耗体力',
              style: TextStyle(
                  fontFamily: FontFamily.PINGFANG,
                  fontWeight: FontWeightCustom.PF_Medium,
                  fontSize: setTextSp(12),
                  color: Color(0x9FFFFFFF)),
            ),
            SizedBox(
              width: setRatio(4),
            ),
            Image.asset(
              imageUtilYeXiu('main/icon_nav_right_physical_strength@3x'),
              width: setRatio(17),
              height: setRatio(17),
            ),
            Text(
              '-${info?.stageBasics?.configInfo?.vitality ?? 0}',
              style: TextStyle(
                  fontFamily: FontFamily.PINGFANG,
                  fontWeight: FontWeightCustom.PF_Medium,
                  fontSize: setTextSp(12),
                  color: Color(0xFFB29AFC)),
            )
          ],
        ),
      ),
    );
  }
}
